<?php
if(!defined('IN_WOGU')) {
    exit('Access Denied');
}

Loader::loadClass('Model');

class GroupModel extends Model
{
    protected $_table = 'group';

    public function getGroups() {
        return $this->select('', '*', '', '', '', 'groupid');
    }
    
    public function addGroup($groupname) {
        return $this->insert(array('groupname' => $groupname));
    }
    
    public function deleteGroup($groupid) {
        return $this->delete(array('groupid' => $groupid));
    }
    
    public function updateGroup($data, $where) {
        return $this->update($data, $where);
    }
}